package com.facebook.listener;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;

import com.facebook.android.FacebookError;
import com.imoblife.brainwavestus.share.BaseDialogListener;

/*
 * callback for the feed dialog which updates the profile status
 */
public class UpdateStatusListener extends BaseDialogListener {
	
	private Activity mActivity;

	public UpdateStatusListener(){}
	
	public UpdateStatusListener(Activity activity) {
		this.mActivity = activity;
	}
	public void onComplete(Bundle values) {
		// final String postId = values.getString("post_id");
		// if (postId != null) {
		// new UpdateStatusResultDialog(MainActivity.this,
		// "Update Status executed", values).show();
		// } else {
		// Toast toast = Toast.makeText(getApplicationContext(),
		// "No wall post made", Toast.LENGTH_SHORT);
		// toast.show();
		// }
		Toast.makeText(mActivity, "UpdateStatus Successfully!", Toast.LENGTH_SHORT).show();
	}

	
	public void onFacebookError(FacebookError error) {
		Toast.makeText(mActivity.getApplicationContext(),
				"Facebook Error: " + error.getMessage(), Toast.LENGTH_SHORT)
				.show();
	}

	
	public void onCancel() {
		Toast toast = Toast.makeText(mActivity.getApplicationContext(),
				"Update status cancelled", Toast.LENGTH_SHORT);
		toast.show();
	}
}
